package com.ibiz.boot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.cache.annotation.EnableCaching;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.ibiz.config.liquibase.MasterProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import com.ibiz.workflow.config.FlowableConfiguration;

@Import(FlowableConfiguration.class)
@SpringBootApplication(exclude = {
 org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
	    org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration.class,
	    org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration.class,
		DruidDataSourceAutoConfigure.class,
	    org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class, 
	    org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration.class
	})
@ComponentScans({
@ComponentScan(basePackages = {"com.ibiz"}
				//,excludeFilters={@Filter(type=FilterType.REGEX,pattern="com.ibiz.webapp.xxx.controller.xxxController")}

				),
})
@MapperScan("com.ibiz.*.mapper")
@EnableCaching
@EnableConfigurationProperties({MasterProperties.class})
public class WebAppMain extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplicationBuilder builder = new SpringApplicationBuilder(WebAppMain.class);
                builder.run(args) ;
	}

}